<title>未来之窗DS</title>
 
	  	<script type="text/javascript" src="./../../jquery.min.js">
	</script>

		<script type="text/javascript" src="./../CyberWin_Cashier_Local_Templates.js">
	</script>

 
	<!--
<script type="text/javascript" src="tpl/Merchant/default/common/market/js/cyberwin_offline_databasev2022.js?v=2020070911294562322251">
 
	</script>
	-->


<style>
*, :before, :after {
  box-sizing: border-box;
}

html {
  height: 100%;
  background: rgba(0,0,0,0.8);
}

body {
  width: 600px;
  height: 100%;
  margin: 0 auto;
  font-family: 'microsoft yahei', cursive;
  color: #333;
}
a{
    text-decoration: none;
}


@keyframes example {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.score_content{
    width: 250px;
    height: 250px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    z-index: 99999;
    display: block;
}
.score_gray{
    width:250px;
    height:250px;
    background: #e6e6e7;
    position:absolute;
    border-radius: 50%;
    top:50%;
    left:50%;
    -webkit-transform: translate(-50%,-50%);
    -moz-transform: translate(-50%,-50%);
    transform:translate(-50%,-50%);
    z-index:1;
}
.score_deg{
    width:250px;
    height:250px;
    background: url("") no-repeat;
    position:absolute;
    border-radius: 50%;
    z-index:10;
    background-size: 250px;
    animation:example 1s linear infinite;
    -webkit-animation:example 1s linear infinite;
}
.score_white{
    width:200px;
    height:200px;
    position:absolute;
    margin:0 auto;
    background: #fff;
    border-radius: 50%;
    top:50%;
    left:50%;
    -webkit-transform: translate(-50%,-50%);
    -moz-transform: translate(-50%,-50%);
    transform:translate(-50%,-50%);
    z-index:20;
}
.score_text{
    /*font-size: 58px;*/
	 font-size: 15px;
	 width: 200px;
    color: #333333;
    position: absolute;
    top:50%;
    left:50%;
    -webkit-transform: translate(-50%,-50%);
    -moz-transform: translate(-50%,-50%);
    transform:translate(-50%,-50%);
    z-index:30;
}
.splash {
    width: 250px;
    height: 250px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    z-index: 99999;
    display: none;
}
.splash>.splash-inner {display: table-cell; text-align: center; vertical-align: middle;background: #fff;border-radius: 50%;}
.splash .loading-circle {position: relative; width: 250px; height: 250px; margin: auto;}
.splash .loading-circle>* {display: block; position: absolute; box-sizing: border-box; border-radius: 50%;width:250px;height:250px;}
.splash .loading-circle>canvas.bg {z-index: 1; width: 100%; height: 100%; border: 25px solid #e6e6e7;}
.splash .loading-circle>canvas.detemask {z-index: 2; transform: rotate(-90deg); -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg);}
.splash .loading-circle>p {z-index: 3;  width: 100%; height: 100%; text-align: center; line-height: 140px; font-size:58px; color: #333;}
</style>

</head>
<body>


<!--检测分旋转动画-->
<div class="score_content">
    <div class="score_gray">
        <div class="score_deg"></div>
        <div class="score_white">
		
            <div class="score_text">
			<center><cyberdiv style="color:#FF9800;font-size:25px;">星链-卫星技术</cyberdiv></center><br/>
                <span id="score">0</span>
				<span id="cyberwin_progress_status_text"></span>
            </div>
        </div>
    </div>
</div>

<!--检测分分数结果-->

<div class="splash" id="splash">
    <div class="splash-inner">
        <div class="loading-circle" id="loadingCircle">
            <p><span id="loadedNum">0</span>分</p>
            <canvas class="detemask" id="loadingProgress" width="250" height="250"></canvas>
            <canvas class="bg" width="250" height="250"></canvas>
        </div>
    </div>
</div>

<script language="javascript">
    function doit(oid, n) {
        var o = document.getElementById(oid);
        var i = parseInt(o.innerHTML) + 1;
        if (isNaN(i)) i = 0;
        o.innerHTML ="wlzc"+ i.toString();
        if (i < n) setTimeout('doit(\'' + oid + '\',' + n + ')', 100);
    }
    //doit('score', 100);
    var slots={},c=document.getElementById('loadingProgress'),ctx=c.getContext('2d');
    window.hasLoaded = 0;
    window.loading = false;
    window.ulp = ulp;
    function ulp(percent){
        window.loading = true;
        var i = 0, draw = null;
        draw = setInterval(function(){
            if (window.hasLoaded > 100) {
                window.loading = false;
                clearInterval(draw);
                draw = null;
                return true;
            }

            if (i<percent) {
                d();
                i++;
                window.hasLoaded += 1;
            } else {
                clearInterval(draw);
                draw = null;
            }
        }, 10);
    }

    function d(){
        var lp = document.getElementById('loadedNum');
        lp.innerHTML = window.hasLoaded;

        var loaded = window.hasLoaded * 2 / 100 * Math.PI, cw = 250, hcw = 125;
        ctx.clearRect (0,0,cw,cw);
        ctx.beginPath();
        ctx.arc(hcw,hcw,hcw-4, 0, loaded, false);
        ctx.lineWidth = 40;
        ctx.strokeStyle = '#ffb400';
        ctx.stroke();
    }
    //ulp(69);
/*
    $(function(){
        doit('score', 100);
        setTimeout(function(){
            $(".score_content").hide();
            $("#splash").show();
            ulp(69);
        },11000);
    })
*/
// doit('score', 100);
 // ulp(10);

   var o = document.getElementById("score");
    o.innerHTML ="下载中....";
</script>

<script>
   var 未来之窗任务task =[];
   未来之窗任务task.push("第一任务=>>console.log(1);");
   未来之窗任务task.push("第2任务=>>console.log(2);");
   未来之窗任务task.push("第dsf任务=>>console.log('未来之窗');");
   let 未来之窗任务服务 = JSON.stringify(未来之窗任务task);
   let 未来之窗任务服务名称 ="cyberwin_global_intent_applocal_Progress";
   //window.localStorage.setItem(未来之窗任务服务名称,未来之窗任务服务);

   function 未来之窗_启动_app(){
	    var 任务_str = window.localStorage.getItem(未来之窗任务服务名称);

		if(任务_str){
		}else{
			alert("无数据");
			return;
		}
		if(任务_str.length < 4){
			alert("无数据");
			return;
		}

	     var 未来之窗任务task_cache = eval('(' + 任务_str + ')');
	   
	    for (let index in 未来之窗任务task_cache){
            let 未来之窗子任务混合 = 未来之窗任务task_cache[index];

			if(任务_str.length < 4){
				 o.innerHTML ="执行"+parseFloat(parseFloat(index)+1)+":任务失败<br>";
				 continue;
			}

			
			let 未来之窗子任务混合Array = 未来之窗子任务混合.split("=>>");
			if(未来之窗子任务混合Array.length < 2){
				 o.innerHTML ="执行"+parseFloat(parseFloat(index)+1)+":任务失败,错误的任务<br>";
				 continue;
			}

			//length
			let 未来之窗任务_title=未来之窗子任务混合Array[0];
			let 未来之窗任务_task=未来之窗子任务混合Array[1];

			let 时差速度 = index*1500;
			

			 setTimeout(function(){ 
				 o.innerHTML ="执行"+parseFloat(parseFloat(index)+1)+":"+未来之窗任务_title+"<br>";
			    eval(未来之窗任务_task);
			 }, 时差速度);

           // eval(未来之窗任务_task);
		}
   }

</script>
<script>
try {
    
	 setTimeout(function(){  未来之窗_启动_app(); }, 1000);
}
catch(err) {
       alert(err);
}
</script>
<script>
/*
function getData(page){
	var api='//51.onelink.ynwlzc.cn//o2o/cyberwin_offline_store.php?g=MerchantV6&c=CyberWin_Store&a=applocal_ajax_shop_goods_synconek&pn='+page;
	$.post(api, function(response){
				if (response.status==4) {
					//layer.msg(response.data);
					alert("数据同步完成");
					//parent.layer.closeall();
					  parent.layer.closeAll();


				} else {
					//window.localStorage.setItem(local_total_index, JSON.stringify(response.data));
					//未来之窗专用存储
					//CyberWin_JsStandardPlug.locStorage_setVal("cyberwinphpdefault","local_cache",local_total_index, JSON.stringify(response.data));
					//shop_mall.init_data_html(response.data);
					//console.log(response.data);
					source_goods_data=response.data;
					var ps=((page-1)*800);
					var pe=page*800;
					var db=new CyberWin_M("cyberwinclient_shop_goods","cyberwino2odb");

					o.innerHTML ="第"+page+"页:"+ps+"~"+pe+"<br>";
					var ret = db.add_mulsame(source_goods_data,function(tx,result){
						 
							console.log("结果：");
							console.log(tx);
							console.log(result);
					});

					 

					getData(page+1);


				}
				//layer.close(index_loading);
			}, 'json');
}

function appinit(){
	var db=new CyberWin_M("cyberwinclient_shop_goods","cyberwino2odb");
	// $sale_goods_fields="goods_id ,sort_id , store_id , name , unit , price , sort , print_id , stock_num, number ,goods_barcodes , item_size ,ch_discount ,  vip_price , vip_price1   ,spec_value  ,measure_flag ";//field

	var sql='create table if not exists cyberwinclient_shop_goods (id integer primary key AutoIncrement, goods_id integer , mer_id integer , store_id integer, name TEXT ,unit TEXT , goods_barcodes TEXT , sort_id integer , sort integer ,item_size TEXT, ch_discount TEXT,price TEXT , vip_price TEXT, vip_price1 TEXT, spec_value TEXT, measure_flag TEXT ,stock_num integer ,name_rem TEXT ,number TEXT ,print_id integer)';
	//alert("创建");
	//alert(sql);
    var ret = db.exec(sql,function(ret,request){
          console.log(request);
		 //  alert("创建");
	});

	 

//	db.init_test();


}
function inittest(){
	var db=new CyberWin_M("cyberwinclient_hand_list","cyberwino2odb");
	//console.log(db);
	//console.log(db.test());
	//console.log(db.createTable());
	//createTable

	var sql='create table if not exists cyberwinclient_hand_list (id integer primary key AutoIncrement, cyber_id TEXT , mer_id TEXT , store_id TEXT, name TEXT ,sex TEXT , physical_id TEXT , sort integer ,current_status integer, current_order_id integer,current_order_rk_time_start TEXT , current_status_text TEXT)';
	var ret = db.exec(sql,function(ret,req){
		//在这里面就可以进行对数据的操作了
		
		//console.log(a)	//a就是回调的结果，输出30
		console.log("结果："+ret);
	});
	//console.log("结果："+ret);
	//
	//ss();
	 
	var data=new Array();
	data["cyber_id"]=2022;
	data["mer_id"]=77;
	data["store_id"]=72;
	data["name"]="A100";
	data["sex"]="男";
	data["physical_id"]="2222";
	data["sort"]=0;
	data["current_status"]=0;
	data["current_order_id"]=0;
	data["current_order_rk_time_start"]=0;
	data["current_status_text"]="";
	var ret = db.add(data,function(ret){
		//在这里面就可以进行对数据的操作了
		
		//console.log(a)	//a就是回调的结果，输出30
		console.log("结果："+ret);
	});
}
function app_delete(){
	var db=new CyberWin_M("cyberwinclient_shop_goods","cyberwino2odb");
	db.where("store_id = '{pigcms{$_GET['store_id']}'");
	db.delete(function(ret,request){
		 console.log("删除");
     console.log(request);
	// alert("删除");
	});
	//delete
}

 try {
	// alert(11);
    appinit();
	//alert(11);
}
catch(err) {
   alert(err);
}

try {
    
	 setTimeout(function(){  inittest(); }, 1000);
}
catch(err) {
       alert(err);
}
try {
 
  setTimeout(function(){  app_delete(); }, 1000);
}
catch(err) {
      alert(err);
}

try {
	 setTimeout(function(){  getData(1); }, 1500);
   
}
catch(err) {
      alert(err);
}
*/
 
</script>
</body>
</html>